package org.groovymud.shell.security.callbacks;

public enum ActionType {
    CREATE, LOAD, EXISTS;

    public void handle(ActionCallbackCommand actionCallbackCommand) {
        switch (this) {
            case CREATE:
                actionCallbackCommand.create();
                break;
            case LOAD:
                actionCallbackCommand.load();
                break;
            case EXISTS:
                actionCallbackCommand.checkExists();
                break;
            default:
                throw new IllegalArgumentException("Action not found " + this.name());
        }

    }
}
